<!DOCTYPE html>
<html>
	{include file="head.html"}
	<body>
{include file='table/nav.html'}
<div class="main-body">
 <table class="tbs">
<thead>  <tr>
   <td>tableid</td>
   <td>名称</td>
   <td>表名称</td>
   <td>描述</td>
   <td>status</td>
<td>操作</td></tr>
  </tr>
</thead> {foreach item=c from=$data}
<tr>
   <td>{$c.tableid}</td>
   <td>{$c.title}</td>
   <td>{$c.tablename}</td>
   <td>{$c.description}</td>
   <td>{$c.status}</td>
<td>
	<a href="/admin.php?m=table_data&tableid={$c.tableid}">数据列表</a>
	<a href="/admin.php?m=table_fields&a=table&tableid={$c.tableid}">字段列表</a>
	<a href="admin.php?m=table&a=add&tableid={$c.tableid}">编辑</a> 
<a target="_blank" href="/index.php?m=table_data&tableid={$c.tableid}">查看</a> 
<a class="js-copy pointer" tableid="{$c.tableid}">复制表</a>
<a href="javascript:;" class="js-delete" url="admin.php?m=table&a=delete&ajax=1&tableid={$c.tableid}">删除</a></td>
  </tr>
   {/foreach}
 </table>
<div>{$pagelist}</div>
</div> 
{include file="footer.html"}
<script>
	$(document).on("click",".js-copy",function(){
		var tableid=$(this).attr("tableid");
		$.get("/admin.php?m=table&a=copy&ajax=1&tableid="+tableid,function(res){
			window.location.reload();
		},"json")
	})
</script>
</body>
</html>